// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IInstrumentStaticData.cs" company="Open Trader">
//   Copyright (c) David Denis (david.denis@systemathics.com)
// </copyright>
// <summary>
//   |  Open Trader - The Open Source Systematic Trading Platform
//   |
//   |  This program is free software: you can redistribute it and/or modify
//   |  it under the terms of the GNU General Public License as published by
//   |  the Free Software Foundation, either version 2 of the License, or
//   |  (at your option) any later version.
//   |
//   |  This program is distributed in the hope that it will be useful,
//   |  but WITHOUT ANY WARRANTY; without even the implied warranty of
//   |  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   |  GNU General Public License for more details.
//   |
//   |  You should have received a copy of the GNU General Public License
//   |  along with this program.  If not, see http://www.gnu.org/licenses
//   |
//   |  Up to date informations about Open Trader can be found at :
//   |    http://opentrader.org
//   |    http://opentrader.codeplex.com
//   |
//   |  For professional services, please visit us at :
//   |    http://www.systemathics.com
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Org.OpenTrader.Framework.Forge.Interfaces
{
    #region Using Directives

    using System;
    using System.ComponentModel;

    using Org.OpenTrader.Framework.Events;
    using Org.OpenTrader.Framework.Forge.Enums;
    using Org.OpenTrader.Framework.LiveObjects.Interfaces;

    #endregion

    /// <summary>
    /// The i instrument.
    /// </summary>
    public interface IInstrumentStaticData : ISimpleObject
    {
        #region Events

        /// <summary>
        /// The property event cb.
        /// </summary>
        event EventHandler<PropertyEventArgs> PropertyEventCB;

        #endregion

        #region Properties

        /// <summary>
        /// Gets a value indicating whether BlackListed.
        /// </summary>
        bool BlackListed { get; }

        /// <summary>
        /// Gets a value indicating whether BuyEnabled.
        /// </summary>
        bool BuyEnabled { get; }

        /// <summary>
        /// Gets Code (ex: IBM US Equity).
        /// </summary>
        string Code { get; }

        /// <summary>
        /// Gets the natural currency of the instrument
        /// </summary>
        [Category("Equity")]
        [Description("Currency of the Equity")]
        ECurrency Currency { get; }

        /// <summary>
        /// Gets the rate of this Instrument Currency / Dictionary Currency
        /// </summary>
        double? CurrencyPrice { get; }

        /// <summary>
        /// Gets the currency of the dictionary
        /// </summary>
        ECurrency DictionaryCurrency { get; }

        /// <summary>
        /// Gets the ID of the dictionary.
        /// </summary>
        Guid DictionaryID { get; }

        /// <summary>
        /// Gets a value indicating whether Enabled.
        /// </summary>
        bool Enabled { get; }

        /// <summary>
        /// Gets the lotsize.
        /// </summary>
        int LotSize { get; }

        /// <summary>
        /// Gets the factor price = CurrencyPrice * PointValue
        /// </summary>
        double? FactorPrice { get; }

        /// <summary>
        /// Gets FeedWiring.
        /// </summary>
        IFeedWiring FeedWiring { get; }

        /// <summary>
        /// Gets the friendly name.
        /// </summary>
        string FriendlyName { get; }

        /// <summary>
        /// Gets a value indicating whether HardToBorrow.
        /// </summary>
        bool HardToBorrow { get; }

        /// <summary>
        /// Gets ID.
        /// </summary>
        Guid ID { get; }

        /// <summary>
        /// Gets ISIN.
        /// </summary>
        string ISIN { get; }

        /// <summary>
        /// Gets Market.
        /// </summary>
        IMarket Market { get; }

        /// <summary>
        /// Gets MaxNominalBook.
        /// </summary>
        double MaxNominalBook { get; }

        /// <summary>
        /// Gets MaxNominalTrade.
        /// </summary>
        double MaxNominalTrade { get; }

        /// <summary>
        /// Gets MaxVariationPercentage.
        /// </summary>
        double MaxVariationPercentage { get; }

        /// <summary>
        /// Gets Name.
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Gets OrderWiring : order service, broker ...
        /// </summary>
        IOrderWiring OrderWiring { get; }

        /// <summary>
        /// Gets Point Value : 1.0 by default
        /// </summary>
        double PointValue { get; }

        /// <summary>
        /// Gets a value indicating whether Restricted.
        /// </summary>
        bool Restricted { get; }

        /// <summary>
        /// Gets a value indicating whether SellEnabled.
        /// </summary>
        bool SellEnabled { get; }

        /// <summary>
        /// Gets a value indicating whether ShortSellEnabled.
        /// </summary>
        bool ShortSellEnabled { get; }

        /// <summary>
        /// Gets TickSizeRule.
        /// </summary>
        ITickSizeRule TickSizeRule { get; }

        /// <summary>
        /// Gets TradingScope.
        /// </summary>
        ETradingScope TradingScope { get; }

        /// <summary>
        /// Gets the type (equity, etc ..)
        /// </summary>
        string Type { get; }

        #endregion
    }
}